package com.gemme.gemme.view;

import android.content.Context;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.widget.Button;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.gemme.gemme.R;
import com.gemme.gemme.wode.TixianBean;

public class SingleTxianView extends RelativeLayout {
    private Context context;
    public SingleTxianView(Context context) {
        this(context,null);
    }

    public SingleTxianView(Context context, AttributeSet attrs) {
        this(context, attrs,0);
    }

    public SingleTxianView(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
        this.context = context;
        initView();
    }
    TextView tv_name;
    TextView tv_price;
    private void initView() {
        LayoutInflater.from(context).inflate(R.layout.single_tixian_view,this);
        tv_name = findViewById(R.id.tv_name);
        tv_price = findViewById(R.id.tv_price);

    }

    public void setData(TixianBean.DataBean.RecordsBean recordsBean) {
        try {
            double assets = recordsBean.getAssets();
            tv_price.setText(assets + "");
            tv_name.setText(recordsBean.getRemarks() + "");
        }catch (Exception e){

        }
    }
}
